package com.nandi.emergencyinspection.mvp.macro

import com.nandi.emergencyinspection.api.ApiServices
import com.tbright.ktbaselibrary.extension.response
import kotlinx.coroutines.launch

/**
 * @创建者: qingsong
 * @创建时间: 2021/3/25 13:28
 * @描述:
 */
class MacroListPresenter : MacroListContract.MacroListPresenter() {


    override fun getList(page: Int, size: Int) {
        mainScope.launch {
            mView?.showLoading()
            val singlePoetry =
                ApiServices.instance.getDisasterListAsync(current = page, size = size).response()

            mView?.showResult(singlePoetry)

            mView?.hideLoading()
        }
    }
}